package br.com.estrategos.modelo.menu;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.ForeignKey;

import br.com.estrategos.modelo.seguranca.GrupoEntity;

/**
 * @author x12259401
 *
 */
@MappedSuperclass
public abstract class SubMenuSubGrupo {

	@Id
	@Column(name = "idsubmenugrupo", unique = true)
	@GeneratedValue
	private Long idSubMenuGrupo;
	
	@ManyToOne
	@ForeignKey(name="fk_idsubmenusub_smsg")
	private SubMenuSubEntity idSubMenuSub;
	
	@ManyToOne
	@ForeignKey(name="fk_idgrupo_smsg")
	private GrupoEntity idGrupo;

	@Column(nullable=false)
	private Date dtcadastro;

	public Long getIdSubMenuGrupo() {
		return idSubMenuGrupo;
	}

	public void setIdSubMenuGrupo(Long idSubMenuGrupo) {
		this.idSubMenuGrupo = idSubMenuGrupo;
	}

	public SubMenuSubEntity getIdSubMenuSub() {
		return idSubMenuSub;
	}

	public void setIdSubMenuSub(SubMenuSubEntity idSubMenuSub) {
		this.idSubMenuSub = idSubMenuSub;
	}

	public GrupoEntity getIdGrupo() {
		return idGrupo;
	}

	public void setIdGrupo(GrupoEntity idGrupo) {
		this.idGrupo = idGrupo;
	}

	public Date getDtcadastro() {
		return dtcadastro;
	}

	public void setDtcadastro(Date dtcadastro) {
		this.dtcadastro = dtcadastro;
	}	
}
